package com.example.myapplication.my_view_model

import android.app.Application
import androidx.lifecycle.AndroidViewModel
import androidx.lifecycle.MutableLiveData

class NavViewModel(application: Application) : AndroidViewModel(application) {

    var scoreData = MutableLiveData(0)

    fun plus(x: Int){
        scoreData.postValue(scoreData.value!!+x)
    }
    fun minus(x:Int){
        scoreData.postValue(scoreData.value!!-x)
    }
    fun reset(x:Int){
        scoreData.postValue(x)
    }
}